home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / pcl4w13.zip / PCL4WREF.DOC < prev    next >
Text File  |  1996-07-10  |  56KB  |  1,497 lines

  1.  
  2.  
  3.                   Personal Communications Library
  4.  
  5.                           For Windows
  6.  
  7.  
  8.                              (PCL4W)
  9.  
  10.  
  11.  
  12.                         REFERENCE MANUAL
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                           Version 1.3
  19.  
  20.                           July 8, 1996
  21.  
  22.  
  23.  
  24.  
  25.                   This software is provided as-is.
  26.            There are no warranties, expressed or implied.
  27.  
  28.  
  29.  
  30.  
  31.                         Copyright (C) 1996
  32.                         All rights reserved
  33.  
  34.  
  35.  
  36.                   MarshallSoft Computing, Inc.
  37.                       Post Office Box 4543
  38.                       Huntsville AL 35815
  39.  
  40.                        Voice : 205-881-4630
  41.                          FAX : 205|880|0925
  42.                          BBS : 205-880-9748
  43.                        email : info@marshallsoft.com
  44.                          web : www.marshallsoft.com
  45.  
  46.  
  47.  
  48.                            _______
  49.                       ____|__     |                (R)
  50.                    --+       |    +-------------------
  51.                      |   ____|__  |  Association of
  52.                      |  |       |_|  Shareware
  53.                      |__|   o   |    Professionals
  54.                    --+--+   |   +---------------------
  55.                         |___|___|    MEMBER
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  PCL4W Reference Manual                                            Page 1
  69.                           T A B L E
  70.  
  71.                              O F
  72.  
  73.                         C O N T E N T S
  74.  
  75.  
  76.  
  77.  
  78.     Chapter                                          Page
  79.  
  80.     Table of Contents..................................2
  81.     Introduction.......................................3
  82.        SioBaud.........................................4
  83.        SioBrkSig.......................................4
  84.        SioCTS..........................................5
  85.        SioDCD..........................................5
  86.        SioDone.........................................6
  87.        SioDSR..........................................6
  88.        SioDTR..........................................7
  89.        SioFIFO.........................................7
  90.        SioFlow.........................................8
  91.        SioGetc.........................................8
  92.        SioGetDiv.......................................9
  93.        SioGets.........................................9
  94.        SioInfo........................................10
  95.        SioIRQ.........................................10
  96.        SioLine........................................11
  97.        SioLoopBack....................................11
  98.        SioModem.......................................12
  99.        SioParms.......................................12
  100.        SioPorts.......................................13
  101.        SioPutc........................................13
  102.        SioPuts........................................14
  103.        SioRead........................................14
  104.        SioReset.......................................15
  105.        SioRI..........................................15
  106.        SioRTS.........................................16
  107.        SioRxBuf.......................................16
  108.        SioRxClear.....................................17
  109.        SioRxQue.......................................17
  110.        SioTxBuf.......................................18
  111.        SioTxClear.....................................18
  112.        SioTxFlush.....................................19
  113.        SioTxQue.......................................19
  114.        SioUART........................................20
  115.        SioUnGetc......................................20
  116.     Function Summary..................................21
  117.     Error Code Summary................................22
  118.     Code Examples.....................................22
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  PCL4W Reference Manual                                            Page 2
  137.                            Introduction
  138.  
  139.  
  140.  
  141.   This  manual  lists  all of the PCL4W functions in alphabetical order. Every
  142.   library function will return a value as follows:
  143.  
  144.   1.  Negative values for error conditions. See last page of this  manual  for
  145.       a list of error values and their meanings.
  146.  
  147.   2.  Non-negative values when returning data (eg: SioLine).
  148.  
  149.   3.  Zero otherwise.
  150.  
  151.   When debugging an application, be sure  to  test  all  return  values.   Use
  152.   SioError() (see file SIOERROR.C) to print the associated text for errors.
  153.  
  154.   Example Code Segment
  155.  
  156.  
  157.   +---------------------------------------------------------------+
  158.   | int Code;                 /* MUST be 'int', not 'char' */     |
  159.   |                                                               |
  160.   | Code = SioFunction( );    /* any PCL4W function */            |
  161.   | if(Code<0)                                                    |
  162.   |   {/* error returned */                                       |
  163.   |    SioError(Code);        /* SioError prints error text */    |
  164.   |    SioDone(Port);         /* always call SioDone last */      |
  165.   |    exit(1);                                                   |
  166.   |   }                                                           |
  167.   | /* no errors */                                               |
  168.   | ...your application code...                                   |
  169.   |                                                               |
  170.   +---------------------------------------------------------------+
  171.  
  172.  
  173.   The  program  SIMPLE is provided as a straight forward and simple example of
  174.   the use of the PCL4W library - at least as straight forward as  any  Windows
  175.   programming can be.
  176.  
  177.   Also look at the TERM program, which is distributed separately from PCL4W as
  178.   WTERM12.ZIP. Many PCL4W functions are used somewhere in TERM.  Other example
  179.   programs will be provided. Look for them on our User Support BBS.
  180.  
  181.   Also note that there are two versions of the library. One  version  is  with
  182.   transmitter  interrupts  disabled  and  one  is  with transmitter interrupts
  183.   enabled.
  184.  
  185.   Refer to the User's Manual (PCL4W.USR) for additional information.
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  PCL4W Reference Manual                                            Page 3
  205.   +-------------+------------------------------------------------------------+
  206.   |   SioBaud   |  Sets the baud rate of the selected port.                  |
  207.   +-------------+------------------------------------------------------------+
  208.  
  209.  
  210.     Syntax    int SioBaud(int Port,int BaudCode)
  211.               /* Port:      Port selected (COM1 - COM20) */
  212.               /* BaudCode:  Baud code */
  213.  
  214.    Remarks    The  SioBaud  function sets the baud rate without resetting  the
  215.               port. It is used to change the baud rate after calling SioReset.
  216.  
  217.                Code   Rate    Name             Code   Rate   Name
  218.                  0     300    Baud300            5    9600   Baud9600
  219.                  1     600    Baud600            6   19200   Baud19200
  220.                  2    1200    Baud1200           7   38400   Baud38400
  221.                  3    2400    Baud2400           8   57600   Baud57600
  222.                  4    4800    Baud4800           9  115200   Baud115200
  223.  
  224.  
  225.    Returns     -4 : No such port. Expect 0 to MaxPort.
  226.               -11 : Bad baud rate code. See above code values.
  227.  
  228.   See Also    SioReset
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.   +-------------+------------------------------------------------------------+
  238.   |  SioBrkSig  |  Asserts, cancels, or detects BREAK signal.                |
  239.   +-------------+------------------------------------------------------------+
  240.  
  241.  
  242.     Syntax    int SioBrkSig(int Port,char Cmd)
  243.               /* Port:      Port selected (COM1 thru COM20) */
  244.               /* char Cmd:  ASSERT, CANCEL, or DETECT */
  245.  
  246.    Remarks    The SioBrkSig function controls the BREAK bit in the line status
  247.               register. The legal commands are:
  248.  
  249.               ASSERT_BREAK ('A') to assert BREAK
  250.               CANCEL_BREAK ('C') to cancel BREAK
  251.               DETECT_BREAK ('D') to detect BREAK
  252.  
  253.               ASSERT_BREAK, CANCEL_BREAK,  and  DETECT_BREAK  are  d